package a_factory.b_abstractFactory;

import a_factory.Car;
import a_factory.a_functionFactory.BenzFactory;
import a_factory.a_functionFactory.BmwFactory;
import a_factory.a_functionFactory.ToyotaFactory;

/**
 * Created by zw on 2018/12/6.
 */
public class CarFactory extends CarAbstractFactory {
    @Override
    public Car getBenzCar() {
        return new BenzFactory().getCar();
    }

    @Override
    public Car getBmwCar() {
        return new BmwFactory().getCar();
    }

    @Override
    public Car getToyotaCar() {
        return new ToyotaFactory().getCar();
    }
}
